<title>消息群发</title>

<div class="layui-card layadmin-header">
  <div class="layui-breadcrumb" lay-filter="breadcrumb">
    <a lay-href="">主页</a>
    <a><cite>应用</cite></a>
    <a><cite>消息群发</cite></a>
  </div>
</div>
  
<div class="layui-fluid">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md12">
      <div class="layui-card">
        <div class="layui-card-header">消息群发</div>
        <div class="layui-card-body">
          
          <form class="layui-form" lay-filter="J_ajaxForm">

            <div class="layui-form-item">
              <label class="layui-form-label">接收用户</label>
              <div class="layui-input-inline">
                <input type="radio" name="sex" value="nan" title="按用户组">
                <input type="radio" name="sex" value="nv" title="按用户名" checked>
                <input type="radio" name="sex" value="nv" title="所有在线用户" checked>
              </div>
            </div>
            
            <div class="layui-form-item">
              <label class="layui-form-label">用户组</label>
              <div class="layui-input-inline">
                <input type="radio" name="sex" value="nan" title="普通会员组">
                <input type="radio" name="sex" value="nv" title="其它会员组" checked>
              </div>
            </div>

            <div class="layui-form-item">
              <label class="layui-form-label">用户名</label>
              <div class="layui-input-inline" style="width: 350px;">
                <input type="text" name="infoMail" value="" lay-verify="email" class="layui-input">
              </div>
              <div class="layui-form-mid layui-word-aux">多个用户名用空格分开</div>
            </div>
            
            <div class="layui-form-item">
              <label class="layui-form-label">标题</label>
              <div class="layui-input-inline" style="width: 350px;">
                <input type="text" name="infoMail" value="" lay-verify="email" class="layui-input">
              </div>
            </div>


            <div class="layui-form-item layui-form-text">
              <label class="layui-form-label">内容</label>
              <div class="layui-input-inline" style="width: 350px;">
                <textarea name="content" class="layui-textarea"></textarea>
              </div>
              <div class="layui-form-mid layui-word-aux">支持html代码</div>
            </div>
            
            <div class="layui-form-item">
              <div class="layui-input-block">
                <input type="button" class="layui-btn" lay-submit lay-filter="btn_submit" value="提交"/>
              </div>
            </div>
          </form>
          
        </div>
      </div>
    </div>
  </div>
</div>

<script>
layui.use(['admin','form'], function(){
    var $ = layui.$
    ,admin = layui.admin
    ,form = layui.form;


  form.on('submit(btn_submit)', function(data){
    admin.req({
      url: global.host+'/config/site'
      ,type: "POST"
      ,data: data.field
      ,done: function(res){
          layer.alert(res.msg);
      }
    });

  });
});
</script>